home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / logins / jb-learn / jb-learn.doc < prev    next >
Text File  |  1996-07-10  |  23KB  |  512 lines

  1.                                  JB-LEARN
  2.                                Version 1.2
  3.                          for {COMMO} Version 6.4X
  4.                       Copyright (C) 1995, Jeff Bishop
  5.                              February 4, 1995
  6.  
  7. Introduction
  8.  
  9.      I have always loved writing {COMMO} macros.  After examining other
  10.      telecommunication programs to see what could be added to {COMMO} I came
  11.      up with the idea of writing a automatic learn macro for {COMMO}.
  12.  
  13.      The {COMMO} macro language is very complex.  Many users have
  14.      been scared of it due to this fact.  I thought to myself
  15.      "what could I do to make it easier".  I decided to write a
  16.      macro that would create {COMMO} macros for login activities
  17.      (or any activity the user wishes).  After weeks of work, JB
  18.      Learn was born to satisfy this requirement/need.
  19.  
  20. What Can JB-Learn do?
  21.  
  22.      JB-Learn has the following features:
  23.  
  24.      -    A very solid learn engine to create ready-to-run macros
  25.           after learn mode is complete.
  26.  
  27.      -    A learn data file capacity to make future learning more
  28.           intelligent.  The learn macro learns as you use it.  This
  29.           is a first in the BBS community.  Find another learn
  30.           engine that can do that (except CS-LEARN for {COMMO}).
  31.           The user has complete control as to what it learns.
  32.  
  33.      -    The learn data file will process {COMMO} variables for
  34.           you.  This gives you even more power.  This allows for great
  35.           flexibility when using CS-MAC since it defines a wealth of
  36.           variables that you can use.
  37.  
  38.      -    Have complete control of your learning experience.  You
  39.           make the decisions if you want to.  This provides the
  40.           ability to correct mistakes that the learn can not
  41.           handle.  This provides the ability to create very solid
  42.           macros.  Just think, you tell the teacher what to do and get a
  43.           better grade for it.
  44.  
  45.      -    Automatic detection of front end mailers.  No need to
  46.           press <ESCAPE> twice any more (even during learning) as long as
  47.           EMSI protocol is being used.
  48.  
  49.      -    The learn can automatically try to log you in without
  50.           user intervention.  This is similar to most other
  51.           conventional learn engines available in other
  52.           communication programs.
  53.  
  54.      -    The ability to add SSLOOK logic in your macros. This will make them
  55.           more stream lined for those nagging prompts often seen on BBS's. 
  56.           Also added logic to allow for forwarding SSLOOKS  after each
  57.           LOOKFOR/SEND combination.  Define the SSLOOK once and use it over
  58.           and over again if need be.
  59.  
  60.      -    The macro is FREE for your use.  The source code is very
  61.           well commented for a great learning experience.
  62.  
  63. Installing JB-LEARN
  64.  
  65.      Installing JB-Learn is very easy.  Follow these steps:
  66.  
  67.      1.   Copy the file JB-LEARN.MAC to the {COMMO} home directory (the
  68.           directory that you installed {COMMO} in).  If you do not plan on
  69.           modifying the source of JB-Learn you might consider using the
  70.           already compiled version of it.  This will load quicker into
  71.           {COMMO}.  If you want to do this simply copy JB-LEARN.CCM to
  72.           JB-LEARN.MAC in your {COMMO} home directory.  The compiled
  73.           version is much smaller than the source version.
  74.  
  75.      2.   The file MY_COMMO.MAC is a slightly modified version of the
  76.           {COMMO} 6.41 COMMO.MAC file.  This macro file has a label that
  77.           points to JB-LEARN.MAC.  In addition, it has been added to the
  78.           ALT-U utility menu.  Besides that, it is a standard COMMO.MAC
  79.           file.  If you have not modified your COMMO.MAC file extensively
  80.           then simply copy this file over your existing COMMO.MAC.
  81.           Otherwise, continue to step 3.
  82.  
  83.      3.   Add the following line to the end of your COMMO.MAC
  84.           file that is located in your {COMMO} home directory:
  85.  
  86.           {:LEARN} {GOTO JB-LEARN,JB-LEARN.MAC} {STOP}
  87.  
  88.           This line will make it a lot easier to add macro links to your
  89.           dialing directory.
  90.  
  91. Adding the Macro Links
  92.  
  93.      This section describes how to add macro links to your
  94.      dialing directory.  If you are using JB-Learn within CS-MAC,
  95.      this is not necessary.  CS-MAC accommodates JB-Learn by using
  96.      the standard login macro links used for mail runs on others.
  97.      These are GLR (generic login) and QWK (mail run).  The way
  98.      that CS-MAC knows that you are wanting to perform a learn is
  99.      by you selecting the learn from the CS-MAC menu structure.
  100.      The learn macro can be setup by selecting ALT-M (macro
  101.      menu), O (online menu, which will be automatically selected
  102.      if you are online), R (Learn).  That is all you have to do.
  103.  
  104.      If you have downloaded JB-Learn as a stand alone package
  105.      then you will need to add macro links to your dialing
  106.      directory.  Here is an example of what this would look like:
  107.  
  108.      Demodulator {290 2807} {PASSWORD} {LEARN} {} 00/00/00
  109.  
  110.      The third set of braces ({}) is where the macro link is
  111.      placed.  Your macro link should look exactly like that one
  112.      (assuming you added the line to commo.mac in the previous
  113.      section).  Your dialing directory may have other settings (or
  114.      even a linked macro already).  Simply substitute the linked
  115.      macro you may have installed for the BBS with this one.  All
  116.      other parameters will be used during your login (terminal
  117.      settings, password, etc.).
  118.  
  119. Before Running JB-Learn
  120.  
  121.      Before you run JB-Learn you should have a very solid
  122.      understanding of what it takes to login to your system.  The
  123.      key thing you must determine is if the BBS uses hot keys or
  124.      whether all responses require that the <ENTER> key be
  125.      pressed.  Try logging into your BBS a few times to insure you
  126.      understand what responses are required.  This will be very
  127.      important when you make decisions about the login.
  128.  
  129. Special Variables Defined in JB-Learn
  130.  
  131.      JB-Learn uses a few special variables that control some of
  132.      its features.  This section will review each of these in
  133.      detail.  These are located at the top of JB-LEARN.MAC.  Here
  134.      is the list of variables and their definitions:
  135.  
  136.      AUTORESP  This variable controls whether or not the user
  137.                should be asked to confirm responses found in the
  138.                data file or not.  If this is set to 'N', the user
  139.                will have to confirm each match.  This is how you
  140.                will achieve best results.  If you are daring set
  141.                this to 'Y' and the learn will assume what it
  142.                finds is correct.  You may or may not get a macro
  143.                that works with AUTORESP set to 'Y'.  This is set
  144.                to 'N' as the default.
  145.  
  146.      CAPTFILE  Jb-Learn uses a capture file to parse the BBS
  147.                prompt.  This variable defines the name of this
  148.                capture file.  The default name is
  149.                COMMO_HOME\{JBLRN}.CAP.  This file is accessed a
  150.                lot.  If you have a ram disk, re-assign this
  151.                variable to a filename that would be placed in
  152.                your ram disk.  This will speed up JB-Learn a great deal.
  153.  
  154.      DATAFILE  This variable contains the name of the learn
  155.                target/response data file.  The default is
  156.                LEARN.DAT.
  157.  
  158.      FON_FILE  This defines the name of the backup dialing directory FON file.
  159.                This is used when adding a new entry to your personal dialing
  160.                directory.  The default value for this variable is
  161.                COMMO_HOME\{JBLRN}.FON.
  162.  
  163.      NOV_MENU  This variable defines whether a full-screen menu should be
  164.                shown, or just an expert one line menu. Set to Y if you want
  165.                novice menus.  Any other value assumes expert menu.
  166.  
  167.      SLKLIMIT  This variable sets the number of SSLOOK strings that can be
  168.                defined.  The default is 15 ({COMMO}'s upper limit).  Set this
  169.                to 0 to not allow SSLOOK strings to be defined.
  170.  
  171.      SSLKAUTO  Set this variable to Y if you want SSLOOKS to be automatically
  172.                generated instead of LOOKFOR/SEND pairs.  This is only going to
  173.                happen in the area that the data file is processed.  It will
  174.                not affect the JB-Learn menu.
  175.  
  176.      WAITTIME  This variable defines the length of time after all
  177.                modem activity stops before the learn process
  178.                starts interacting with the user.  The default is
  179.                10 seconds.  Change the definition if you would
  180.                like.  Be careful though to keep it long enough. 
  181.                Making it too short will have disastrous affects
  182.                in the learn engine.  If this variable is set as
  183.                NULL, then this auto learn type feature is turned off.
  184.  
  185. Running Jb-Learn
  186.  
  187.      Once the link has been added to your dialing directory, just
  188.      open the dialing directory with ALT-D and dial away.  The
  189.      learn will start once you have connected.
  190.  
  191.      The following paragraphs will describe what activities will
  192.      take place during the learn run.  Study this carefully.
  193.  
  194. JB-Learn Flow (What Actually Happens)?
  195.  
  196.      After you connect, you will see the following message on the
  197.      status line:
  198.  
  199.      <ESC> FOR LEARN MODE
  200.  
  201.      You can press <ESCAPE> at any time to invoke the learn
  202.      processor.  Do NOT press <ESCAPE> until all output from the
  203.      modem has stopped.  This is crucial.  The WAITTIME variable
  204.      determines how long the macro will wait after modem activity
  205.      is seen before invoking the learn processor.  If you do not
  206.      press <ESCAPE> the macro will automatically invoke the
  207.      processor after the number of seconds you have defined in
  208.      WAITTIME.  This is why WAITTIME should be set to at least 5
  209.      to 7 seconds.
  210.  
  211.      Once the learn processor is invoked it will search the
  212.      capture file for the BBS prompt.  If it can not find one, it
  213.      will prompt the user for it.  So, be very observant when you
  214.      look at the screen.  Most of the time the macro will
  215.      determine the prompt.  In very rare cases, it may not find
  216.      it.  This happens mostly if you press <ESCAPE> while the
  217.      modem is sending data to the terminal screen.  Remember to
  218.      not press <ESCAPE> until ALL output has stopped.  Once the
  219.      BBS prompt has been determined, processing will continue.
  220.  
  221.      If this is the first time through the processor, we will
  222.      need to define the macro file and label name to write to.
  223.      You will be prompted for this information.  I suggest that
  224.      you do NOT write to COMMO.MAC or JB-LEARN.MAC.  Name the
  225.      macro something unique.  This is completely up to you though.
  226.      You will next define the label name used for the macro.  The label name
  227.      will be defaulted to the system name dialed.  You will then be asked to
  228.      edit it.  Once this is done a check for invalid characters in the label
  229.      name is made and the label name will be limited to 8 characters.  The
  230.      following characters are checked for since they are not allowed in a
  231.      label name: , : / { }.
  232.  
  233.      Remember, this label is going to be used in the dialing directory so make
  234.      it something meaningful.  The macro name will also be used.  Keep both
  235.      names meaningful.
  236.  
  237.      You will be prompted to see if you would like to use auto
  238.      learn mode.  This allows you to set the AUTORESP variable.
  239.      If set to 'Y', no prompting to confirm targets/responses is
  240.      done.  See documentation about AUTORESP defined earlier in this file.
  241.  
  242.      A match of the BBS prompt along with a response is attempted from the
  243.      SSLOOK strings you may have defined during learn mode.  If one is made,
  244.      an automatic response is sent and learn continues until the next prompt. 
  245.      This allows for automatic response to SSLOOKS without really using SSLOOK
  246.      logic during learn operation.  The BBS prompt strings must match exactly.
  247.  
  248.      The learn processor will now begin looking through the data
  249.      file.  It is looking for a match from the BBS prompt it knows
  250.      about with the targets defined in the data file.  If it can
  251.      not find one, then control passes to the special learn menu.
  252.      This menu will be described later.  It looks for a match and
  253.      stops at the first one it finds.  This is why placement of
  254.      the targets/responses is very important.  If it finds one, it
  255.      first checks to see if the response is a {COMMO} variable.
  256.      If it is, it translates it.  You are then asked to confirm
  257.      the response to the BBS prompt.  If you answer 'Y', the code
  258.      will be written to the macro and the learn processor begins
  259.      all over again.  It will wait for your key press or the
  260.      timeout period before attempting to process the next BBS
  261.      prompt.  If you answer 'N', you will be taken to the learn menu.
  262.  
  263.      The learn processor will continue this way until you are
  264.      done.  We will now discuss the learn menu.  This menu provides
  265.      a great deal of control not available in other areas of the
  266.      learn engine.
  267.  
  268. The JB-Learn Menu
  269.  
  270.      Here is what the learn menu will look like:
  271.  
  272.      JB-LEARN RESPONSE TYPE MENU - VERSION 1.2
  273.      BBS PROMPT:
  274.  
  275.      C - CONTINUE LEARNING
  276.  
  277.      E - SEND <ENTER>
  278.  
  279.      H - TREAT AS A SINGLE KEY HOT KEY (NO <CR>)
  280.  
  281.      I - INSERT COMMENT INTO MACRO
  282.  
  283.      L - TREAT AS A SSLOOK STRING: (SSLOOK COUNT# )
  284.  
  285.      P - TREAT AS A PASSWORD
  286.  
  287.      Q - QUIT JB-LEARN
  288.  
  289.      R - REVISE/EDIT BBS PROMPT
  290.  
  291.      S - ENTER STANDARD BBS RESPONSE (WITH <CR>)
  292.  
  293.      W - SET WAIT TIME:
  294.      X - TOGGLE BETWEEN NOVICE AND EXPERT MENU
  295.      ENTER CHOICE: C,E,H,I,L,N,P,Q,R,S,W,X: 
  296.  
  297.      The following paragraphs describe each option in this menu
  298.           in detail.
  299.  
  300. C - CONTINUE LEARNING
  301.      This option simply continues to learn.  Use this if you
  302.      accidentally came here by mistake.
  303.  
  304. E - SEND <ENTER>
  305.      Use this option if you just need to respond to the BBS
  306.      prompt with a <ENTER> key.
  307.  
  308. H - TREAT AS A SINGLE KEY HOT KEY (NO <CR>)
  309.      Many systems use what are called hot keys.  These are menu
  310.      choices that simply require a one character response (no
  311.      <ENTER> required).  This option will provide a way of sending
  312.      these hot keys.
  313.  
  314. I - INSERT COMMENT INTO MACRO
  315.      This option allows you to write a line to the macro file.
  316.      This could be a comment or even additional commands.  This
  317.      option simply takes what you enter and writes it to the
  318.      macro.  Be very careful with this one.
  319.  
  320. L - TREAT AS A SSLOOK STRING
  321.      This menu option allows you to create SSLOOK strings and place them into
  322.      your macros.  Consult the {COMMO} documentation on what a SSLOOK command
  323.      will do.  Basically, the SSLOOK should be used when nagging prompts
  324.      appear often during a login session.  The SSLOOK will send the
  325.      string/response you tell it when it sees the target.  You may have up to
  326.      15 SSLOOKS active at one time.  When the menu appears, it will show you
  327.      the current number of active SSLOOKS.  Consult the {COMMO} documentation
  328.      (macro.doc) for more information on this capability.
  329.  
  330. P - TREAT AS A PASSWORD
  331.      This option will send your password to the host and write
  332.      macro code to do it in your macro.  The routine will check to
  333.      see if you defined a password in the dialing directory.  If
  334.      you have, it simply uses it.  If you did not, you will be
  335.      asked for the password.
  336.  
  337. Q - QUIT JB-LEARN
  338.      This option terminates the learn processor.  When this
  339.      happens, final code is written to the macro file.  You are
  340.      also asked if you want to create a new dialing directory
  341.      entry in your dialing directory file.  If you answer yes you
  342.      will be prompted for the system name (a default is provided
  343.      if known), and the phone number will be asked for.  The
  344.      routine will place the new entry just after the one already
  345.      defined in the dialing directory.  The string '(WITH LEARN)'
  346.      is appended to the system name.  If no entry matching the
  347.      system name is seen, the entry will be placed at the end of
  348.      your dialing directory.  The linked macro will automatically
  349.      be defined for you based upon the input entered earlier. A backup of
  350.      your original dialing directory file is made prior to any modifications.
  351.      The name of this dialing directory file is defined with the variable
  352.      FON_FILE.  Once this is done, the variables are cleared out of memory and
  353.      the JB-Learn processor will be terminated.
  354.  
  355. R - REVISE/EDIT BBS PROMPT
  356.      This option allows you to edit the BBS prompt.
  357.  
  358. S - ENTER STANDARD BBS RESPONSE (WITH <CR>)
  359.      This option allows you to enter a string to send to the BBS.
  360.      This string will be terminated with a <ENTER> character.
  361.  
  362. W - SET WAIT TIME:
  363.      This option allows you to update the WAITTIME variable
  364.      described above.
  365.  
  366. X - TOGGLE BETWEEN NOVICE AND EXPERT MENU
  367.      This menu option toggles between the novice menu and the expert menu.
  368.      You will be presented with a 1 line menu showing the letters available
  369.      when in expert mode.  When in novice mode, the entire menu will be shown.
  370.  
  371. The JB-Learn Data File Format
  372.  
  373.      One of JB-Learn's strongest features is its use of a special
  374.      data file to process potential BBS prompts and have possible
  375.      responses to them.  This is accomplished with the use of the
  376.      LEARN.DAT data file.  This file has a special data format
  377.      that the macro uses to parse through.  Here are the rules for
  378.      this data file:
  379.  
  380.      1.   Any comments desired in the file should begin with a
  381.           space character in column 1.  Any lines beginning with a
  382.           space are ignored.
  383.  
  384.      2.   The file may be of any size.
  385.  
  386.      3.   The response / target lines should look like this:
  387.  
  388. RESPONSE,TARGET
  389. RESPONSE|,TARGET
  390. N|,MORE Y/N?
  391. %_PAS|,PASSWORD:
  392.  
  393.      The response comes first and begins in column 1 of the line.
  394.      {COMMO} variables may be used.  Precede them with a %
  395.      character.  If the value of the variable used in the data
  396.      file is blank, you will be asked to define it during the
  397.      learn macro processor.  Other special {COMMO} characters may
  398.      also be used in the response string.  A list of these is
  399.      below:
  400.  
  401.      CHARACTER DESCRIPTION
  402.  
  403.      ^M or |   Carriage return
  404.      ^J        Linefeed
  405.      ^I        TAB
  406.      ^L        Formfeed
  407.      ^[        Escape
  408.      ^G        Bell
  409.      ^S        XOFF
  410.      ^Q        XON
  411.      ^Z        End of file
  412.  
  413.      The response string is separated from the target (BBS
  414.      prompt) by a comma ',' character.  Look at the examples shown
  415.      above.  These show {COMMO} variables being used, standard
  416.      strings, and the use of special characters (like | to
  417.           represent a <CR> character).
  418.  
  419.      The macro will append strings to the data file if you tell
  420.      it to when asked.  These entries will follow the format
  421.      described here.  This format is also used in the CS-LEARN
  422.      macro product as well.  So, if you are using that one as
  423.      well, the data file will work the same way.
  424.  
  425. The Future of JB-Learn
  426.  
  427.      Like any other product, I hope to continue to evolve
  428.      JB-Learn.  Here are a few ideas that you will probably see in
  429.      future versions of JB-Learn:
  430.  
  431.      -    A more automated setup routine to add the JB-Learn link
  432.           to your dialing directory.  This will help the beginning
  433.           users a great deal.
  434.  
  435.      -    I would like to expand the LEARN.DAT data file to
  436.           contain more strings and responses.  This will help all of us.
  437.           If you want to contribute, just send them my way.
  438.  
  439.      -    Add all user suggestions that are possible with {COMMO}'s rich
  440.           programming language.  Start sending them my way.
  441.  
  442.      Again, this macro is another learning project for all of you
  443.      to study.  If you make changes to it that are significant in
  444.      nature, please send them my way.  My contact information is
  445.      located at the end of this document.  Let us make this thing
  446.      sing and dance even better!
  447.  
  448. Thanks
  449.  
  450.      I would like to thank the following people:
  451.  
  452. My Wife (Keri)
  453.      My wonderful wife who puts up with a programmer that stays
  454.      up all night.  She tells me she is my second love.  Well,
  455.      hmmmmm ... Just kidding <GRIN>.
  456.  
  457. Fred Brucker
  458.      I would like to thank Fred for the great product {COMMO}.  I
  459.      would also like to thank him for the great SFI enhancements
  460.      he has made to the program.  Without that, it would have
  461.      never even been possible to use it.  Thank you very much
  462.      Fred! Keep up the good work!
  463.  
  464. Chuck Seyboldt
  465.      Thanks to Chuck for the wonderful suggestions regarding
  466.      {COMMO} macro programming tricks and tips.  Good work sir and
  467.      keep CS-MAC alive.  You are an inspiration to me.
  468.  
  469. Jim Bennett
  470.      I would like to thank Jim for the technical review of JB
  471.      Learn.  Without it some nasty little bugs would have been
  472.      seen by all of you.  Thanks Jim.  Also, thanks to Jim for the
  473.      use of his BBS to distribute JB-Learn (more on that later).
  474.  
  475. Contact Information
  476.  
  477.      I value all of your input.  Please contact me with any
  478.      suggestions you may have.  You can contact me via the following methods:
  479.  
  480.      Jeff Bishop
  481.      Mailing Address: 420 E Yavapai RD. NO. H Tucson, AZ 85705
  482.      E-Mail Address : JBISHOP@PRIMENET.COM (my PGP public key in MYPUBLIC.KEY)
  483.      Voice Phone    : 1-602-888-1456 (evenings before 12:00AM EST).
  484.  
  485.      I can also be reached in the COMMO conference in the fidonet and WME
  486.      message networks.  Post a message to "jeff bishop" and I will surely
  487.      respond to it.
  488.  
  489. Getting JB-Learn Updates
  490.  
  491.      JB-Learn is distributed in two different packages.  I am
  492.      distributing it as a stand alone package and it is also in the
  493.      CS-MAC package (version 13 and above).  If you are reading this from
  494.      the CS-MAC archive, this may or may not be the latest one.  Use the
  495.      information below to get the latest and greatest version.
  496.  
  497.      If you have access to the internet, you can use ftp to get JB Learn.
  498.      Ftp to ftp.primenet.com.  Login as anonymous and send your e-mail
  499.      address as the password.  Once logged in, cd to  /users/j/jbishop/commo.
  500.      Once here, get the file jbl-*.zip.  This will get you the latest
  501.      version. You are also welcome to get the latest version of CS-MAC
  502.      here as well. Get the file cs*.zip.
  503.  
  504.      If you wish, you can also ftp to ftp.nlbbs.com. Login as anonymous and
  505.      send your mail address as password. Once here, cd to /pub/cs-mac.
  506.  
  507.      If you do not have access to the internet, you can log in to the
  508.      Demodulator BBS.  The phone number is 1-602-290-2807.  Use 'COMMO RELEASE'
  509.      as your first and last name.  Use 'guest' as the password.  A menu will
  510.      be presented to allow you to pick JB-Learn from.
  511.      In addition, other {COMMO} products can be downloaded from this menu. 
  512.